package com.springmvc.service;

import com.springmvc.dao.AdminMapper;
import com.springmvc.entity.Admin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@Service
public class AdminService {

    @Autowired
    private AdminMapper adminMapper;

    public int deleteByPrimaryKey(Integer id){
        return adminMapper.deleteByPrimaryKey(id);
    }

    public Admin selectByPrimaryKey(Integer id){
        return adminMapper.selectByPrimaryKey(id);
    }

    public int insert(Admin admin){
        return adminMapper.insert(admin);
    }

    public ArrayList<Admin> selectName(Admin record){
        return adminMapper.selectName(record);
    }

    public ArrayList<Admin> selectlist(){
        return adminMapper.selectlist();
    }
}
